package bz.ziro.kanbe.model;

import java.io.Serializable;
import java.util.Date;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.users.User;

import org.slim3.datastore.Attribute;
import org.slim3.datastore.Model;

@Model
public class Mail implements Serializable {

    private static final long serialVersionUID = 1L;

    @Attribute(primaryKey = true)
    private Key key;

    @Attribute(version = true)
    private Long version;

    private Integer schemaVersion = 1;

    @Attribute
    private Key siteKey;
    @Attribute
    private Key parentPageKey;
    
    @Attribute
    private String fromAddress;

    @Attribute
    private String toAddress;
    
    @Attribute
    private Key siteTemplateKey;
    
    @Attribute
    private Key pageTemplateKey;
    
    @Attribute
    private String subjectName;
    
    @Attribute
    private String textName;
    
    @Attribute
    private String fileName;

    @Attribute
    private User creator;
    @Attribute
    private Date createDate;
    @Attribute
    private User editor;
    @Attribute
    private Date editDate;

    /**
     * Returns the key.
     *
     * @return the key
     */
    public Key getKey() {
        return key;
    }

    /**
     * Sets the key.
     *
     * @param key
     *            the key
     */
    public void setKey(Key key) {
        this.key = key;
    }

    /**
     * Returns the version.
     *
     * @return the version
     */
    public Long getVersion() {
        return version;
    }

    /**
     * Sets the version.
     *
     * @param version
     *            the version
     */
    public void setVersion(Long version) {
        this.version = version;
    }

    /**
     * Returns the schema version.
     *
     * @return the schema version
     */
    public Integer getSchemaVersion() {
        return schemaVersion;
    }

    /**
     * Sets the schema version.
     *
     * @param schemaVersion
     *            the schema version
     */
    public void setSchemaVersion(Integer schemaVersion) {
        this.schemaVersion = schemaVersion;
    }

	/**
	 * @param parentPageKey the parentPageKey to set
	 */
	public void setParentPageKey(Key parentPageKey) {
		this.parentPageKey = parentPageKey;
	}

	/**
	 * @return the parentPageKey
	 */
	public Key getParentPageKey() {
		return parentPageKey;
	}

	/**
	 * @param subjectName the subjectName to set
	 */
	public void setSubjectName(String subjectName) {
		this.subjectName = subjectName;
	}

	/**
	 * @return the subjectName
	 */
	public String getSubjectName() {
		return subjectName;
	}

	/**
	 * @param textName the textName to set
	 */
	public void setTextName(String textName) {
		this.textName = textName;
	}

	/**
	 * @return the textName
	 */
	public String getTextName() {
		return textName;
	}

	/**
	 * @param fileName the fileName to set
	 */
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	/**
	 * @return the fileName
	 */
	public String getFileName() {
		return fileName;
	}

	/**
	 * @param fromAddress the fromAddress to set
	 */
	public void setFromAddress(String fromAddress) {
		this.fromAddress = fromAddress;
	}

	/**
	 * @return the fromAddress
	 */
	public String getFromAddress() {
		return fromAddress;
	}

	/**
	 * @param toAddress the toAddress to set
	 */
	public void setToAddress(String toAddress) {
		this.toAddress = toAddress;
	}

	/**
	 * @return the toAddress
	 */
	public String getToAddress() {
		return toAddress;
	}

	/**
	 * @param siteTemplateKey the siteTemplateKey to set
	 */
	public void setSiteTemplateKey(Key siteTemplateKey) {
		this.siteTemplateKey = siteTemplateKey;
	}

	/**
	 * @return the siteTemplateKey
	 */
	public Key getSiteTemplateKey() {
		return siteTemplateKey;
	}

	/**
	 * @param pageTemplateKey the pageTemplateKey to set
	 */
	public void setPageTemplateKey(Key pageTemplateKey) {
		this.pageTemplateKey = pageTemplateKey;
	}

	/**
	 * @return the pageTemplateKey
	 */
	public Key getPageTemplateKey() {
		return pageTemplateKey;
	}

	/**
	 * @param siteKey the siteKey to set
	 */
	public void setSiteKey(Key siteKey) {
		this.siteKey = siteKey;
	}

	/**
	 * @return the siteKey
	 */
	public Key getSiteKey() {
		return siteKey;
	}
	

    public User getCreator() {
        return creator;
    }

    public void setCreator(User creator) {
        this.creator = creator;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public User getEditor() {
        return editor;
    }

    public void setEditor(User editor) {
        this.editor = editor;
    }

    public Date getEditDate() {
        return editDate;
    }

    public void setEditDate(Date editDate) {
        this.editDate = editDate;
    }
}
